prune: Retain the tip of each ref even with date pruning
authorColin Walters <walters@verbum.org>
Mon, 8 Aug 2016 19:41:09 +0000 (15:41 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 9 Aug 2016 15:12:35 +0000 (15:12 +0000)
commitfd9536bb19dc70f14a9fe0f622f52aa80d36b85b
tree9e635567d80f2603bfc26b26e2f8db8c864cb32f
parent056cc0543f2a965fbcb66952b9c9d295fdd2e865
prune: Retain the tip of each ref even with date pruning

I hit an error with [CAHC](https://wiki.centos.org/SpecialInterestGroup/Atomic/Devel)
where we were doing time-based pruning.  `ostree summary -u` started failing,
and it took me a bit to realize it was because we were pruning
even the tip of old branches, which I was not at all expecting,
and I don't think users will too.

Perhaps in the future we could add some sort of --prune-ref-tips or
something if people wanted it, but I doubt it.

Closes: #445
Approved by: jlebon
src/ostree/ot-builtin-prune.c
tests/test-prune.sh